<ion-view view-title="对战" cache-view="false" class="battle-area">
    <ion-content>
        <div class="list card battle-box">
            <div class="item item-body">

                <!-- 对战实时展示区域 开始 -->
                <ul class="card pro-wp" ng-show="battle.status == 'N' || battle.status == 'I' || battle.status == 'F'">
                    <li class="item item-progress" ng-repeat="user in allUsers" ng-click="deferUser(user._id)">
                        <span class="userinfo" ng-show="showUserInfo" ng-clock>{{user.name}}</span>
                        <div style="width: 100%;height: 100%;display: inline-block;padding-right: 60px;">
                            <div class="status" ng-class="user.photo || 'user1'" style="width:{{((allScores[user._id] || 0)/paper.totalScore) * 100}}%">
                                <!--<span class="info input-label text-left">{{user.name}} 得分:{{allScores[user._id] | fen}}</span>
                                <progress ng-class="{'html5':user._id==battle.owner._id,'node-js':user._id!=battle.owner._id}"
                                          max="{{paper.totalScore}}" value="{{allScores[user._id] || 0}}"
                                          ng-click="deferUser(user._id)"></progress>-->
                            </div>
                        </div>
                    </li>
                </ul>
                <!-- 对战实时展示区域 结束 -->

                <!-- 对战题目区域 开始 -->
                <div class="card questionbody" ng-show="battle.status == 'I' || battle.status == 'F'">
                    <div class="item item-text-wrap title">【{{questionNum - paper.questions.length}}/{{questionNum + 1}}题】{{currentQuestion.text}}</div>
                    <div class="item item-text-wrap">
                        <ul class="list">
                            <li class="wings item item-checkbox" ng-repeat="opt in currentQuestion['opts']">
                                <div class="w-c">
                                    <div class="text">
                                        <span>{{opt['idx']}}、{{opt['text']}}</span>
                                    </div>
                                </div>
                                <div class="w-l option">
                                    <label class="checkbox">
                                        <!-- 注意在ng-repeat中 不能使用$event.target传入参数 -->
                                        <input type="checkbox" ng-click="doCheckOpt(opt, $event)"/>
                                    </label>
                                </div>
                            </li>

                        </ul>
                    </div>
                </div>
                <!-- 对战题目区域 结束 -->


                <div class="ready flex-item-1" ng-if="battle.status !== 'I' && battle.status !== 'F' && !battleStatus">

                </div>

                <div class="go flex-item-1" ng-class="battleStatus ? 'move': ''"  ng-if="battle.status !== 'I' && battle.status !== 'F'">

                </div>

                <!--<div class="button-bar" ng-show="battle.status == 'I' || battle.status == 'F'">
                    <a class="button button-positive" ng-click="doCommit()">确定</a>
                </div>-->

                <!-- 道具-按钮-结束  -->
            </div>


        </div>
    </ion-content>
</ion-view>

<a class="sub-btn" id="goout" ng-show="showFleeButton" ng-click="fleeBattle()">逃跑</a>

<!-- 道具-按钮-开始  -->
<div class="item item-divider toolbar fn-clear battle-toolbar">
    <span class="ru-t fn-left" ng-clock> X {{deferPropCount}}</span>
    <!-- 倒计时  -->
    <span class="text-right fn-left"><em class="time" ng-clock>{{countdown}}</em>秒</span>

    <a class="button button-positive sub-btn fn-left" ng-show="battle.status == 'I' || battle.status == 'F'" ng-click="doCommit()">确定</a>

    <a class="button button-positive sub-btn fn-right" ng-show="showStartButton" ng-click="startBattle()">开始</a>

</div>